package admin.server;

import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.ApplicationPidFileWriter;
//import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @Title: AdminServerApplication
 * @ProjectName com-bigwavn-group
 * @Description: spring-cloud-监控服务启动类
 * @author: wangweitao
 * @date: 2019/4/17 14:25
 * @version: V1.0.0
 */
//@EnableEurekaClient
@EnableAdminServer
@EnableDiscoveryClient
@SpringBootApplication
public class AdminServerApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = new SpringApplicationBuilder(
                AdminServerApplication.class).run(args);
        //写 入PID
        context.addApplicationListener(new ApplicationPidFileWriter());
        System.out.println("ヾ(◍°∇°◍)ﾉﾞ大浪商城后台监控服务启动成功ヾ(◍°∇°◍)ﾉﾞ");
    }
}
